Masala #1182
Epik son
Shohruh epik sonlarni juda ham yaxshi ko'radi. Endi u N sonini epik usulda yaratmoqchi. N sonini epik usulda yaratishlar sonini hisoblang.
Agar sonni A+B*C ko'rinishida ifodalash mumkin bo'lsa, ushbu son epik deb ataladi. Bu yerda A, B, C - bir-biridan farq qiluvchi natural sonlardir.
Kirish faylida \(N(1 \le N \le 2*10^6)\) soni kiritiladi.
N sonini epik usulda yaratishlar sonini hisoblang.
# | input.txt | output.txt |
---|---|---|
1 |
6 |
4 |
2 |
3 |
0 |
3 |
7 |
10 |
1 -test uchun:
(2, 1, 4), (2, 4, 1), (4, 1, 2), (4, 2, 1)
3-test uchun:
(1, 2, 3), (1, 3, 2)
(2, 1, 5), (2, 5, 1)
(3, 1, 4), (3, 4, 1)
(4, 1, 3), (4, 3, 1)
(5, 1, 2), (5, 2, 1)